home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / msdos / batmnu23.zip / BATMNU23.DOC < prev    next >
Text File  |  1993-10-29  |  38KB  |  866 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                     ┌────────────────────────────────────┐  
  24.                     │  ╔══════════════════════════════╗  │▒▒
  25.                     │  ║                              ║  │▒▒
  26.                     │  ║            BATMNU            ║  │▒▒
  27.                     │  ║    Batch File Menu System    ║  │▒▒
  28.                     │  ║         Version  2.3         ║  │▒▒
  29.                     │  ║                              ║  │▒▒
  30.                     │  ╚══════════════════════════════╝  │▒▒
  31.                     └────────────────────────────────────┘▒▒
  32.                       ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                 October 29, 1993
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.                                TABLE OF CONTENTS
  81.  
  82.   1.0  INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  83.        1.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  84.  
  85.   2.0  MENU FORMAT  . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  86.        2.1  General Format Rules  . . . . . . . . . . . . . . . . . . . .    1
  87.        2.2  Window Options  . . . . . . . . . . . . . . . . . . . . . . .    2
  88.        2.3  Window Appearance . . . . . . . . . . . . . . . . . . . . . .    3
  89.        2.4  Other Window Options  . . . . . . . . . . . . . . . . . . . .    4
  90.        2.5  Option Lines  . . . . . . . . . . . . . . . . . . . . . . . .    5
  91.        2.6  Option Help . . . . . . . . . . . . . . . . . . . . . . . . .    5
  92.        2.7  Headers and Footers . . . . . . . . . . . . . . . . . . . . .    5
  93.  
  94.   3.0  WHAT HAPPENS IN THE BATCH FILE?  . . . . . . . . . . . . . . . . .    6
  95.  
  96.   4.0  MENUS WITH PARAMETERS  . . . . . . . . . . . . . . . . . . . . . .    7
  97.  
  98.   5.0  MOUSE SUPPORT  . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  99.  
  100.   6.0  SCREEN SAVER . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  101.  
  102.   7.0  SHAREWARE INFORMATION  . . . . . . . . . . . . . . . . . . . . . .    8
  103.        7.1  New Security Version  . . . . . . . . . . . . . . . . . . . .    9
  104.        7.2  New Utility Available . . . . . . . . . . . . . . . . . . . .    9
  105.        7.3  Bonus Program . . . . . . . . . . . . . . . . . . . . . . . .   10
  106.  
  107.   8.0  BATMNU History . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  108.  
  109.   APPENDIX  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
  110.  
  111.  
  112.  
  113.  
  114.                                   BATMNU  v2.3
  115.                                   Warren Small
  116.                                     (c) 1993
  117.  
  118.   1.0  INTRODUCTION
  119.   ───────────────────────────────────────────────────────────────────────────
  120.   This  program is a menuing system  for use with your batch files.  It is not
  121.   intended  to  be  a shell,  although  with some  very  ambitious batch  file
  122.   programming, it could be  used as one. Even  nested menus are  possible. Its
  123.   purpose is  to provide  sophisticated flow  control and  give batch  files a
  124.   professional  appearance by creating  a point-and-shoot  menu with  up to 26
  125.   options  per menu. The  cursor keys and  the HOME and  END keys  can then be
  126.   used  to make  the  selection.  Each option  can be  selected by  a 'hotkey'
  127.   defined by your menu.  A mouse is also supported  if detected and there is a
  128.   Screen Saver feature to protect your display.
  129.  
  130.   1.1 Syntax
  131.   ───────────────────────────────────────────────────────────────────────────
  132.   BATMNU [d:][path]filename [label] [default]
  133.  
  134.   The program defaults to a filename extension of  "mnu" if none is  provided.
  135.   The filename can indicate  a separate file or, if  you prefer, the  menu can
  136.   be  within the calling batch file. You  will have to code the  batch file so
  137.   those  lines are never executed, of  course. If a  separate file is used, it
  138.   can be 'hidden' making it more secure from tapering. 
  139.  
  140.   The optional label  parameter can be used if you  wish to put more than  one
  141.   menu  within   the  file.  Bracket  your   menu  lines   with  ":label"  and
  142.   ":end_label". BATMNU will search your  path for the file if  it's not in the
  143.   current directory. The label can be up to 15 characters long. 
  144.  
  145.   The default  parameter on  the command line  is used  if you want  an option
  146.   other  than the  first one  to be  highlighted  when  the menu  starts. e.g.
  147.   "BATMNU NORTON.BAT 3" will highlight the third option.
  148.  
  149.   2.0  MENU FORMAT
  150.   ───────────────────────────────────────────────────────────────────────────
  151.        :menu  {keyword to mark where the program should start reading}
  152.        header,header text
  153.        h_format,fYEL,bred,t1,d1  {header colors, time, date}
  154.        window,tRED,hWHI,...   {colors and window appearance definition}
  155.        title,title text
  156.        option,option text,[#] {# indicates hotkey position in option text}
  157.        help,help text       {must follow option help refers to}
  158.        option,option text,[#][,[drive],[directory],program] {optional format}
  159.        option...
  160.        . 
  161.        .
  162.        .
  163.        footer,footer text
  164.        f_format,fYEL,bred,t1,d1  {footer colors, time, date}
  165.        :end_menu  {Program stops reading and closes the file}
  166.  
  167.   2.1  General Format Rules
  168.   ───────────────────────────────────────────────────────────────────────────
  169.   The definition can  be organized in almost any order as long as it is placed
  170.   between the ':menu' and ':end_menu' keywords (or other label if provided  on
  171.  
  172.                                      Page 1
  173.  
  174.  
  175.  
  176.  
  177.                                   BATMNU  v2.3
  178.                                   Warren Small
  179.                                     (c) 1993
  180.  
  181.   the command line). The  window line should appear before the options if  you
  182.   use the 'l', 'n'  or 'a' parameter. Maximum  title length is  54 characters.
  183.   Headers and footers  can be 70 characters long  if the time and/or date  are
  184.   not used.  If you  leave the  title out,  your menu  will contain only  your
  185.   defined options.  Header and footer are  optional. Maximum  option length is
  186.   50  characters  for  single  column  menus  and  25  characters  for  double
  187.   column.(See "no_margin"  description on page 4  for longer  title and option
  188.   lines.) Maximum help length is 70 characters.
  189.  
  190.   All parameters on  the window, h_format and  f_format lines are separated by
  191.   a comma. Spaces are  ignored. The keywords can  be indented for  clarity, if
  192.   desired, using spaces or TABs.
  193.  
  194.   Environment variables can be used within  the header, footer, options,  help
  195.   lines or  title. The  variables are indicated  by surrounding the  name with
  196.   the percent (%)  sign, just as you would on  a batch file command line.  The
  197.   variable's value is inserted when the menu  is displayed. If the variable is
  198.   not found,  the variable  name is  used as  it appears  in the  menu with  %
  199.   signs.
  200.  
  201.   2.2  Window Options
  202.   ───────────────────────────────────────────────────────────────────────────
  203.   The  "window"  line in  your menu  will  define  the colors,  appearance and
  204.   actions  of your  menu.  Each  switch of  keyword should  be separated  by a
  205.   comma. The color options are:
  206.  
  207.        f# - foreground color of window (0-15)
  208.        b# - background color of window, (0-7)
  209.        t# - title color (0-15)
  210.        o# - option color (0-15)
  211.        h# - hotkey color (0-15)
  212.        k# - screen color (clears screen), foreground (0-15), background (0-7)
  213.        e# - screen border color (0-15)
  214.  
  215.   Color options should  be followed  by one of the  color values shown in  the
  216.   chart  below. Hotkeys can  be made  invisible by using "hinv"  on the window
  217.   line.  The hotkeys  will still  select the  options but  the menu  will  not
  218.   indicate them. This gives  you the look of a simpler "light bar" style menu.
  219.  
  220.  
  221.                                   COLOR VALUES
  222.                 0 or bla = Black      8 or BLA = Grey          
  223.                 1 or blu = Blue       9 or BLU = Bright Blue   
  224.                 2 or gre = Green     10 or GRE = Bright Green  
  225.                 3 or cya = Cyan      11 or CYA = Bright Cyan   
  226.                 4 or red = Red       12 or RED = Bright Red    
  227.                 5 or mag = Magenta   13 or MAG = Bright Magenta
  228.                 6 or yel = Brown     14 or YEL = Yellow        
  229.                 7 or whi = White     15 or WHI = Bright White  
  230.  
  231.   The  'k' option  fills double  duty  setting  the foreground  and background
  232.   color for  the screen. The first  k parameter will  set the background,  the
  233.   second  the foreground (Foreground default  is "whi" if not specified).  The
  234.  
  235.                                      Page 2
  236.  
  237.  
  238.  
  239.  
  240.                                   BATMNU  v2.3
  241.                                   Warren Small
  242.                                     (c) 1993
  243.  
  244.   foreground  color is used  with the fill  character. The  fill character can
  245.   appear after  the  color  of either  to  give  the  screen  background  more
  246.   interest than a flat color. Use of the drop shadow is more dramatic too.
  247.  
  248.   If you prefer, a string could be used  to fill the screen background. Either
  249.   words or special characters  could be used.  Put the string after the  color
  250.   as  above. If you want to  add spaces, use  the underscore (_) character. It
  251.   will be treated as a space when displayed. (e.g. kred_Main_Menu)
  252.  
  253.   The 'e'  option sets  the screen border  color which is  outside the  normal
  254.   text area. An 'e' used alone will reset the border to its normal black.
  255.  
  256.   Default colors  are provided (fYEL, bblu, tWHI, oCYA, hRED)  and the options
  257.   will be left-justified. The menu will be in  single column format unless  it
  258.   exceeds 12 options. It  will have a  double line frame (m2). Default  colors
  259.   for headers/footers are fWHI, bred.
  260.  
  261.   2.3  Window Appearance
  262.   ───────────────────────────────────────────────────────────────────────────
  263.   The window appearance options are:
  264.  
  265.          s# - shadow on, 1-4 to position shadow relative to menu
  266.           c - center each option individually
  267.           w - display menu in wide, 2 column format, default for > 13 options
  268.           l - default to letter selection of options
  269.           n - default to number selection of options, maximum of 10 options
  270.        a[n] - automatic selection of hotkeys. [optional no case favoring]
  271.          m# - menu frame type, 1 - ┌─, 2 - ╔═, 3 - ╒═, 4 - ╓─,  5 - █▀
  272.          r# - top row for menu window
  273.          c# - left column for menu window
  274.   no_margin - display menu without wide margin around the frame
  275.       popup - save entire screen and restore when menu closes
  276.  
  277.   The shadow  position is  set with  the 's'  option. 1  is below  and to  the
  278.   right. 2 is below and the  to left. 3 is above and  to the right. 4 is above
  279.   and to the left. The 's' option alone defaults to 1.
  280.  
  281.   Menu options are  normally left justified. If you want your options centered
  282.   in the menu, use the 'c' switch.
  283.  
  284.   If you  want a  2 column menu,  the 'w' switch  will force BATMNU  into this
  285.   mode.  As a default,  menus with  more than 13 options  are always displayed
  286.   this way.
  287.  
  288.   The  'l' option can be useful  when you have a large number of options or if
  289.   you just  prefer  it that  way.  The  'n' option  is  for those  who  prefer
  290.   numbered menus.  Naturally, only  10 options  are possible  with numbers  as
  291.   hotkeys. The 'c'  option is  overridden if you  use 'l' or  'n'. With  these
  292.   options, your  maximum option  length  is reduced  by 3  characters and  the
  293.   hotkey position will be set to 1. If you follow  the 'l' or 'n' with another
  294.   character such  as a dash,  period or  parenthesis, this will  be used as  a
  295.   separator. (e.g. 'l-' will produce 'A-', 'B-', etc for the menu.)
  296.  
  297.  
  298.                                      Page 3
  299.  
  300.  
  301.  
  302.  
  303.                                   BATMNU  v2.3
  304.                                   Warren Small
  305.                                     (c) 1993
  306.  
  307.   It is  not necessary to  specify the hotkeys for your  options. If you leave
  308.   this information  out, BATMNU defaults to the first character.  By using the
  309.   'a' switch,  BATMNU will  make sure  you don't  end up  with duplicates.  It
  310.   makes a one-pass  search to find unique letters for all the options. You can
  311.   override the  selection by  indicating the  hotkey on  the option line.  The
  312.   search favors uppercase letters unless the no-case modifier is used, 'an'.
  313.  
  314.   To  place the menu at a position other than centered  on the screen, the 'r'
  315.   and  'c' switches will  define the  position of the upper  left hand corner.
  316.   BATMNU will make  adjustments to ensure the menu  and shadow, if used,  will
  317.   remain within the screen boundaries. BATMNU  will not confuse 'c' (centered)
  318.   with 'c#', column #.
  319.  
  320.   If you prefer that the  menu does not have the large margin around the menu,
  321.   use the  "no_margin" keyword to  eliminate it. This will  increase the Title
  322.   and Option line maximum length to 60 and 56 respectively. It the menu  is in
  323.   2 column format, the max option length is 28.
  324.  
  325.   You have  the option to save  the entire screen  before BATMNU displays  the
  326.   menu,  and restore  the saved  contents after the  menu closes.  Include the
  327.   keyword "popup" on  the "window" line  to make this happen.  Cursor position
  328.   is saved as well.
  329.  
  330.   2.4  Other Window Options
  331.   ───────────────────────────────────────────────────────────────────────────
  332.   There are four other options for the window line:
  333.  
  334.        x - disables the mouse. No search is performed.
  335.        p - Screen Saver Pause
  336.        v - Option Return Value
  337.        ~ - Allows use of the Escape key to exit menu, returns errorlevel 0
  338.  
  339.   Use  'x' if  you do not  want to use the  mouse. The mouse  check is skipped
  340.   when the program  starts and there is no delay in activating  the menu. This
  341.   option has no effect on systems without a mouse.
  342.  
  343.   'p' controls  the pause time before  the Screen Saver activates. The default
  344.   is 5  minutes. The Screen  Saver can  be disabled with 'p0'  and the maximum
  345.   setting is 30 minutes (p30).
  346.  
  347.   Information about the option chosen can  be returned through the environment
  348.   by using the 'v' option. It  extracts a portion or all  of the option's text
  349.   and can  be used  for a  number of  things. Its  format is  "v#var" where  #
  350.   controls the number of characters to return (1-60)  and var is the  variable
  351.   name  to use. If the variable  name is not specified, BATMNU will use "VAL".
  352.   In retrieving the text, if  # is larger than the option's length, the entire
  353.   option text is  returned. If you use the letter or number  option, the label
  354.   is skipped  so that just the option's text is placed in the environment. See
  355.   the example batch file, NORTONV.BAT, to see  how this feature can be used to
  356.   eliminate "if errorlevel" statements and simplify  the batch file. NOTE: DOS
  357.   3.3 or higher is needed to use this feature.
  358.  
  359.  
  360.  
  361.                                      Page 4
  362.  
  363.  
  364.  
  365.  
  366.                                   BATMNU  v2.3
  367.                                   Warren Small
  368.                                     (c) 1993
  369.  
  370.   Normally, ESCape  is not a valid  key for a  menu. If you wish  ESCape to be
  371.   active, place  a '~'  on the window line. Errorlevel 0 will be returned.  If
  372.   the 'v' option is used, the environment variable will be set to "ESC".
  373.  
  374.   2.5  Option Lines
  375.   ───────────────────────────────────────────────────────────────────────────
  376.   As stated above, the format for the option line is:
  377.  
  378.        option,Option Text,hotkey[,drive letter,directory,program params]
  379.  
  380.   Hotkey position starts at 1 and will default to that position if  omitted or
  381.   the number is longer  than the text. Alternately,  the hotkey can be defined
  382.   with a character. BATMNU will first search the option text for  an uppercase
  383.   letter that  matches. If there is no  uppercase match, the program will do a
  384.   lowercase search for the first character  that matches. (e.g. "Disk  Info,i"
  385.   will highlight  the I  of "Info".  "Disk Filer,i"  will highlight  the i  in
  386.   "Disk".) Use a number if you want a specific character as your hotkey. 
  387.  
  388.   If  a  hotkey character  is  duplicated,  the menu  will  return  the  value
  389.   associated with the first option with that  hotkey if the hotkey is pressed.
  390.   If the highlight bar  is used to select  an option with  a duplicate  hotkey
  391.   value, the highlighted option value will be returned.
  392.  
  393.   You can  let BATMNU select  the hotkeys, if  you wish,  with the 'a'  window
  394.   parameter. The choices can  be overridden by the option line selection.  The
  395.   menu will default  to letter choices if  it runs out  of characters  to pick
  396.   from. This procedure will  also favor uppercase characters before lowercase.
  397.   To override this, use 'an' (auto hotkey, no case).
  398.  
  399.   If  the program cannot  find any  options in the  file, a Menu  Format Error
  400.   message will be displayed.
  401.  
  402.   Refer to the section,  Menus With Parameters (page  7), to see a description
  403.   of the drive, directory and program options.
  404.  
  405.   2.6  Option Help
  406.   ───────────────────────────────────────────────────────────────────────────
  407.   The Help line specifies  text which will appear  in the footer  (See below.)
  408.   when the option is highlighted. It can be  up to 70 characters long  and can
  409.   appear with  the time  and date.  This will  restrict the  help line  length
  410.   some,  depending on  the time/date  format used.  The help  must follow  the
  411.   option  it  refers  to  creating  option/help   pairs  in  the  menu.   e.g.
  412.   "option,Norton Commander" could be followed by "help,File Utility".
  413.  
  414.   2.7  Headers and Footers
  415.   ───────────────────────────────────────────────────────────────────────────
  416.   Header and Format format lines have the following options:
  417.  
  418.        f# - Text Foreground color (0-15)
  419.        b# - Text Background color (0-7)
  420.        t# - Display time of day (0-4)
  421.        d# - display today's date (0-5)
  422.      popup - show text while menu is displayed only
  423.  
  424.                                      Page 5
  425.  
  426.  
  427.  
  428.  
  429.                                   BATMNU  v2.3
  430.                                   Warren Small
  431.                                     (c) 1993
  432.  
  433.   The header and footer items define  a line of text to  appear at the top and
  434.   bottom of  the screen. The  entire row will  be colored  with the background
  435.   color. Colors are defined  on the h_format  and f_format lines using the  f#
  436.   (foreground) and b# (background) parameters as  shown above. Refer to Window
  437.   Options on page 2 for more information on colors.
  438.  
  439.   Another  option for the f_format and h_format lines  is the keyword "popup".
  440.   Normally, the  header and footer  lines remain after  the menu selection  is
  441.   made. If you want either or both of these lines to disappear with  the menu,
  442.   include  the  keyword  "popup"  on  the   appropriate  format  line.   Their
  443.   appearance will be the same when the menu  is displayed, however, they  will
  444.   disappear, restoring the  original lines, or the  menu background if  k# was
  445.   used (p. 2), when the menu closes.
  446.  
  447.   The  time and date  can appear in the header and  / or footer. On the format
  448.   line(s)  include a  't' for  time and  'd'  for date  followed by  a  number
  449.   indicating the format to use. They are as follows:
  450.  
  451.                  TIME                     DATE
  452.             0 -  HH:MM:SS (default)  0 -  MM/DD/YY (default)
  453.             1 -  HH:MM:SS am         1 -  MM/DD/YYYY
  454.             2 -  HH:MM am            2 -  DDD MMM DD, YYYY
  455.             3 -  HH.MM.SS            3 -  DD/MM/YY
  456.             4 -  HH.MM               4 -  DD/MM/YYYY
  457.                                      5 -  DDD DD MMM YYYY
  458.  
  459.   The  date will appear to the  left of the header or footer and the time will
  460.   appear to the right.  If the header/footer  is too  long, the time and  date
  461.   information  could overwrite it.  A footer  can be  combined with  help (See
  462.   above.) with the  help line given precedence. If an option has no help line,
  463.   the footer is displayed.  Use of the "pop_help" keyword in the window  (page
  464.   6)  line will cause  the footer to disappear with  the menu when a selection
  465.   is made.
  466.  
  467.   3.0  WHAT HAPPENS IN THE BATCH FILE?
  468.   ───────────────────────────────────────────────────────────────────────────
  469.   If  you execute  the sample  batch file,  NORTON.BAT, you  will see  a  menu
  470.   displaying several  choices. If  you  choose one  of the  options, you  will
  471.   probably see  a lot of  DOS error  messages as the  chance of  your computer
  472.   being set up  the same way is negligible. When you view the  batch file, you
  473.   can get a good idea how BATMNU operates.
  474.  
  475.   The menu is near the beginning of the batch  file mainly for speed. You will
  476.   notice a "GOTO START" statement which causes  the batch to branch around the
  477.   menu.  After the ":START"  label is  the command line that  calls BATMNU and
  478.   tells it what file the menu  is in. If this file is not  in your PATH or  in
  479.   the current directory when started, you would  need to specify the full path
  480.   name. .e.g BATMNU D:\UTIL\NORTON.BAT
  481.  
  482.   DOS ERRORLEVEL  is set on exit  from BATMNU with EL  1 corresponding to  the
  483.   first option, etc. A  series of "if errorlevel  x goto ..." statements after
  484.   the line calling BATMNU will allow the batch file to determine  which option
  485.   was selected  and branch to  the appropriate label.  EL 127  is set whenever
  486.  
  487.                                      Page 6
  488.  
  489.  
  490.  
  491.  
  492.                                   BATMNU  v2.3
  493.                                   Warren Small
  494.                                     (c) 1993
  495.  
  496.   the program encounters an  error (file not found or parameter error) so  you
  497.   should plan your batch file accordingly. If the  Escape key option is  used,
  498.   this  will  always  return  an  EL  0.  Be  sure to  order  your  errorlevel
  499.   statements from  largest to  smallest since "if  errorlevel 3" will  be true
  500.   for EL=3 or greater. See your DOS manual for more information.
  501.  
  502.   Executing BATMNU with no  parameter will display a  help screen and  example
  503.   menu if the file BATMNU.HLP, included in the  original archive file, can  be
  504.   found (See  the  Appendix  for more  info on  this file).  If  you type  the
  505.   command "BATMNU  NORTON.BAT" from the DOS prompt, the menu will be displayed
  506.   as before but  nothing will happen when you  make a choice.  You need to run
  507.   the batch file itself  to get anything  to start. Several example files  are
  508.   contained  in this  archive, including  one  showing  a separate  menu file,
  509.   another a  menu  within a  batch file,  and a  third detailing  a menu  with
  510.   parameter passing.
  511.  
  512.   4.0  MENUS WITH PARAMETERS
  513.   ───────────────────────────────────────────────────────────────────────────
  514.   Optionally, a program can be started directly from BATMNU. This  will result
  515.   in shorter  batch files  as minimal  ERRORLEVEL checking  is necessary.  You
  516.   will also find  the programs will start faster since there is  no batch file
  517.   processing. The option  line contains additional information relating to the
  518.   drive, directory and program name is this form:
  519.  
  520.                        option,Word Perfect,w,c:,\wp51,wp
  521.  
  522.   In  this example, BATMNU  will change  the drive and directory  and start WP
  523.   when  this option  is  selected.  When  WP  is  finished, you  are  returned
  524.   directly to  your batch file. BATMNU  sets an  environment variable, ERRLEV,
  525.   to identify the  program run. You may wish to do further processing based on
  526.   the  program run or you can check for an  ERRORLEVEL code returned from that
  527.   program. The ERRLEV variable will equal the  number of the option picked. If
  528.   WP  was the third  option, ERRLEV=3  would be in the  environment. You could
  529.   then  run  an  automatic  backup  procedure  for   WP  with  the  line   "if
  530.   %ERRLEV%!==3! goto wpbackup". 
  531.  
  532.   Additional  parameters can be  passed to  your program.  Simply include them
  533.   after the program name as you normally would.
  534.  
  535.         option,Paradox - Phones,11,e:,\paradox\phones,paradox3 phone.scr
  536.  
  537.   This line would  start Paradox which would then run the script phone.scr. It
  538.   is  recommended  that  your  batch file  clear  the ERRLEV  variable  at the
  539.   beginning and end to preserve space and  prevent your batch file from acting
  540.   on old information in the environment. The  statement "SET ERRLEV=" will  do
  541.   this.
  542.  
  543.   If  there are no  parameters on a line,  you can use BATMNU  the same way as
  544.   earlier  versions and the ERRLEV  variable will not  be set.  If you want to
  545.   leave out the drive and/or directory parameters, leave  a comma to mark  it.
  546.   BATMNU will assume the program  can be found in your PATH. If you don't  use
  547.   any parameters for  an option, the placeholders  are not necessary. See  the
  548.   files NORTONP.BAT and NORTON.BAT in this archive for a comparison.
  549.  
  550.                                      Page 7
  551.  
  552.  
  553.  
  554.  
  555.                                   BATMNU  v2.3
  556.                                   Warren Small
  557.                                     (c) 1993
  558.  
  559.   If you want the highlight  bar to be on the  option you just  selected after
  560.   returning, the  ERRLEV variable can be used  on the command  line to set the
  561.   default option. The command:
  562.  
  563.                           BATMNU NORTONP.BAT %ERRLEV%
  564.  
  565.   will do this. Refer to the  example file NORTONP.BAT to see  how this is set
  566.   up.
  567.  
  568.   IMPORTANT NOTE: DOS 3.3 or higher is  required if you want to use parameters
  569.   on the  option  lines.  This  is  necessary  so  that  BATMNU  can  use  the
  570.   environment  to  relay information  back  to  the  batch  file. BATMNU  will
  571.   display  an error message and return an EL=0 if you are not using the proper
  572.   DOS version.
  573.  
  574.   5.0  MOUSE SUPPORT
  575.   ───────────────────────────────────────────────────────────────────────────
  576.   When BATMNU is run, it checks for  a mouse unless the 'x' parameter is found
  577.   on  the "window" line. This switch  will cause BATMNU to skip the check for,
  578.   and  not use, the mouse. Once  the mouse is  detected, the mouse cursor will
  579.   be set next to the first  option. The delay you will  observe after the menu
  580.   is displayed and before  the highlight bar appears is the mouse initializing
  581.   and is normal.
  582.  
  583.   Options can be selected with  the mouse by  moving the cursor to the  option
  584.   line and  clicking the left button.  If the option is currently highlighted,
  585.   BATMNU  acts as if the hotkey was pressed. If not, only the highlight bar is
  586.   moved. A second click will then select that option.
  587.  
  588.   The right mouse button acts like the ESCape key if the ~ option is used.
  589.  
  590.   6.0  SCREEN SAVER
  591.   ───────────────────────────────────────────────────────────────────────────
  592.   If  you use  BATMNU for  a shell,  you will  appreciate this  feature.  As a
  593.   default, if the program does not see any key presses  or mouse clicks in a 5
  594.   minute  period, the  screen will  blank to  protect your  display. Only  the
  595.   cursor will  show in  the upper  left hand corner.  Press any  key or  mouse
  596.   button to restore the screen.
  597.  
  598.   The pause  time  before blanking  is set  on the  Window line  with the  'p'
  599.   parameter.  'p0' will  disable this  feature  and  the maximum  pause before
  600.   blanking is 30 minutes.
  601.  
  602.   7.0  SHAREWARE INFORMATION
  603.   ───────────────────────────────────────────────────────────────────────────
  604.   This program is provided as  "shareware". You are allowed to use it, free of
  605.   charge,  for a reasonable amount of  time. If you find BATMNU  to be useful,
  606.   and continue to  use it,  a registration fee of  $15 plus $2.50 postage  and
  607.   handling is required. A  form is supplied with the archive file to  register
  608.   with (BATMNU23.REG). Paying this fee will  encourage me to make improvements
  609.   and/or  correct problems for future versions. Registered  users will receive
  610.   notification of future releases  and information on how the new version  can
  611.   be obtained. It will also give their ideas for improvements more value. 
  612.  
  613.                                      Page 8
  614.  
  615.  
  616.  
  617.  
  618.                                   BATMNU  v2.3
  619.                                   Warren Small
  620.                                     (c) 1993
  621.  
  622.   7.1  New Security Version
  623.   ───────────────────────────────────────────────────────────────────────────
  624.   If you have trouble with people messing with your menu files, BATMNU  is now
  625.   available in  a  version which  will  read  specially encrypted  files.  The
  626.   encryption scheme will not fool the CIA, but  it should keep curious  people
  627.   from playing with your screen definition files.
  628.  
  629.   This new version, called  BATMNU-E, has all of  the features of  the regular
  630.   program  and is  completely compatible with  it. It will  read straight text
  631.   files as well  as the encypted ones. The  program which does the  encrypting
  632.   (and  decrypting for editing) is  included with BATMNU-E  and is very simple
  633.   to use.
  634.  
  635.   If you  want to receive  BATMNU-E and the  companion encypting program,  the
  636.   cost is $15. Use the form provided to register either or both.
  637.  
  638.   7.2  New Utility Available
  639.   ───────────────────────────────────────────────────────────────────────────
  640.   WHY DO USERS LIKE A MENU?
  641.  
  642.   Because it makes their life easier. Now there is something  to make the menu
  643.   designer's life  easier! Now creation of the menu is taken out of your hands
  644.   and onto the screen!
  645.  
  646.   The BatMnu  Menu Utility makes  creating menus fast  and painless. It  gives
  647.   instant feedback on what your new menus will  look like. Debugging the  most
  648.   sophisticated menu  is  now  a  chore of  the  past. Seasoned  BATMNU  users
  649.   quickly find they wouldn't be without this utility.
  650.  
  651.   It's out of  beta testing now, and available to all registered BATMNU users.
  652.   Why do you need this? LOOK!
  653.  
  654.       - See your menu as you are creating it. Instant feedback on changes and
  655.         additions. The menu has the same look and feel it will have with
  656.         BATMNU.
  657.       - No need to remember which switch does what.
  658.       - Menus are created just by filling in forms, answering a few Yes/No
  659.         questions or selecting values from a list.
  660.       - Automatic formatting of the menu file.
  661.       - Menus can be edited even if they are inside batch files.
  662.       - Up to 16 menus from the same file can be edited at one time.
  663.       - Rearranging options is as easy as highlighting the option and
  664.         pressing a key. 
  665.  
  666.   I know you will  want the easiest  way to create and edit menus  for BATMNU.
  667.   The BatMnu Menu Utility will make  menu maintenance as easy as  filling in a
  668.   form. Use  the  registration form  (BATMNU23.REG)  to  order BMU  with  your
  669.   registered  version of BATMNU.  It's just  $10 if you order  with BATMNU. If
  670.   you  decide to order  later you  will have  to pay  an additional  $2.50 for
  671.   postage and handling. Get your copy today!
  672.  
  673.  
  674.  
  675.  
  676.                                      Page 9
  677.  
  678.  
  679.  
  680.  
  681.                                   BATMNU  v2.3
  682.                                   Warren Small
  683.                                     (c) 1993
  684.  
  685.   7.3  Bonus Program!
  686.   ───────────────────────────────────────────────────────────────────────────
  687.   Upon receipt of the registration  fee, a disk will be sent with the  current
  688.   version plus the program SW-DIR.EXE. This  program provides a scrolling file
  689.   directory  which can be used to choose  a file and pass that  filename to an
  690.   application or use  it in your batch file. Appearance options are similar to
  691.   BATMNU. The program includes a QuickSearch  feature which can quickly locate
  692.   a file by name. DOS 3.3 or higher is required to use this program.
  693.  
  694.   Site  licenses  for BATMNU  can  be  negotiated.  Registered  1.X users  can
  695.   upgrade to  2.3 for $5  plus $2.50 for  postage and  handling. Feel free  to
  696.   give  it to  friends  or  upload the  original archive  file to  other BBS's
  697.   provided that  no fee is charged for distribution and it  is not modified in
  698.   any way. Note to BBS Sysops:  Please post this archive file  as is, with all
  699.   files included, and without changing the filename.
  700.  
  701.   Ver. 2.3    October 29, 1993
  702.  
  703.   Warren Small                              CIS  71076,407
  704.   35 Benjamin Street                        GEnie  W.SMALL
  705.   Manchester, NH  03109                     Prodigy  RSJW31A
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.                                     Page 10
  740.  
  741.  
  742.  
  743.  
  744.                                   BATMNU  v2.3
  745.                                   Warren Small
  746.                                     (c) 1993
  747.  
  748.   8.0  BATMNU History
  749.   ───────────────────────────────────────────────────────────────────────────
  750.   1.1  2/02/90  First general release.
  751.  
  752.   1.2  3/15/90   Options increased  to 26.  Added automatic hotkeys  (A, p. 4)
  753.        and hotkey choice by letter (p. 5).
  754.  
  755.   1.3  4/22/91  Added numbered options (N, p. 3),  menu frame choices (M#,  p.
  756.        3), invisible hotkeys (INV, p. 2).
  757.  
  758.   2.0  9/30/91   New  option line  format to  start programs  directly (p. 7).
  759.        Added  mouse support (p.  8), screen border  color control  (E#, p. 3),
  760.        screen foreground  color control (K#, p.  2), header  and footer option
  761.        (p.  5),  shadow  position  control  (S#,  p.  3),  letter  and  number
  762.        separator (L, N, p. 3).
  763.  
  764.   2.0a 1/31/92    Maintenance release  fixing  several  bugs.  Parameters  now
  765.        passed  properly  to  programs  started  by  BATMNU.  Border color  set
  766.        properly.  Default colors provided  for header  and footer.  Header and
  767.        footer documentation provided.
  768.  
  769.   2.1  6/30/92  Added time/date  options to header and footer (T#, D#, p.  6).
  770.        Header and footer  string length increased to  70 (p. 5).  Default menu
  771.        choice can be  specified on command  line (p. 1).  Corrected action  of
  772.        menu with duplicate hotkeys (p. 5).  Hotkey selection by letter  favors
  773.        uppercase match in option text (p.  4). Option string length  increased
  774.        to  50  for  single  column  menus.  Help  line option  added  (p.  5).
  775.        Background string fill added (K#string, p. 3). 
  776.  
  777.   2.1a 9/22/92   Environment variables can be  used in  title, header, footer,
  778.        options and help (p. 2). ESC now clears help line (p. 5).
  779.  
  780.   2.2  1/11/93   Right mouse  button used  as ESC  (p. 8). Screen  Saver added
  781.        (P#, p. 8). Help now in external file (p. 12).
  782.  
  783.   2.3  10/29/93  Added  row/col positioning for menu (R#, C#, p. 4), option to
  784.        remove wide margin around menu frame  which increases title and  option
  785.        maximum  length (p. 4),  popup style  header and footer  (popup, p. 6),
  786.        popup  mode for  the entire  screen  (popup,  p. 4),  and option  value
  787.        return through environment (V#[var], p. 4).  Default 2 column menu  now
  788.        occurs at  14 instead of 12. Menu  errors now return  EL 127 instead of
  789.        EL 0. Encryption version now available (p. 9). BatMnu Menu Utility  now
  790.        available (p. 9).
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.                                     Page 11
  803.  
  804.  
  805.  
  806.  
  807.                                   BATMNU  v2.3
  808.                                   Warren Small
  809.                                     (c) 1993
  810.  
  811.   APPENDIX
  812.   ───────────────────────────────────────────────────────────────────────────
  813.   BATMNU  2.2 and  higher uses  an  external file  for help  information.  The
  814.   advantage  to this is  that it  makes the program  file smaller and  it also
  815.   allows  a certain amount of customizing by the end  user. The following is a
  816.   guide to the structure of the help file, BATMNU.HLP.
  817.  
  818.   Each  section begins  with a  header which  contains a  keyword, the  window
  819.   size, and  the number of strings that will be placed in the window, enclosed
  820.   in {}'s.
  821.  
  822.        {Keyword; top row; left col; bottom row; right col; # of strings}
  823.                      Example: {W_Colors; 12; 16; 18; 63; 4}
  824.  
  825.   The upper left  corner for  this window is  at row  12, column  16, and  the
  826.   lower right is on row  18, at column 63. There are 4 strings of  information
  827.   that follow in this format:
  828.  
  829.                             c or s; row; col; string
  830.               Example:                                            
  831.               c; 12; 40;┤ WINDOW COLORS ├                          
  832.               s; 14; 19;f - Foreground Color  b - Background Color
  833.               s; 15; 19;t - Text Color        o - Option Color    
  834.               s; 16; 19;h - Hotkey Color      k - Screen Colors   
  835.  
  836.   The letter  beginning the line  indicates whether it should  be centered (c)
  837.   at  the position indicated or printed right at the position (s). The row and
  838.   column position follows and then the string itself.
  839.  
  840.   If you decide you want to alter or add to the information in the file,  here
  841.   are a few things to remember. 
  842.  
  843.        - The window should  start at row 8 or more  and end at row 22 or  less
  844.        unless you don't care  if it covers the  other text on  the screen.  In
  845.        that instance, it  can extend from row 1  to 25. The background text is
  846.        not disturbed in any case.
  847.  
  848.        - The keyword cannot  be altered. These are  hard coded into  BATMNU at
  849.        present.  If changed, the  program would  not be able to  find the help
  850.        section.
  851.  
  852.        -  If the window position values  are 0, as  is the case for the 'Main'
  853.        section, there  is no window drawn  and the program  does not wait  for
  854.        the user to press a key.
  855.  
  856.        - Make  sure that,  if you  add strings  to a  section, you  adjust the
  857.        window size  accordingly. Likewise, position the  strings so that  they
  858.        fit in the window.
  859.  
  860.        - Each  parameter is separated  by a semi-colon.  A space  is used only
  861.        for readability. Leading spaces in a string are used.
  862.  
  863.  
  864.  
  865.                                     Page 12
  866.